/*
 * JVM_OpcodeArray.h
 *
 *  Created on: 05.01.2011
 *      Author: Tavin
 */
#include "JVM_DataTypes.h"

#ifndef JVM_OPCODEARRAY_H_
#define JVM_OPCODEARRAY_H_

typedef struct {
	uint32_t  class;
	uint16_t size;
	uint8_t data[];
} JVM_Array_Boolean;


typedef struct {
	uint32_t  class;
	uint16_t size;
	int8_t data[];
} JVM_Array_Byte;


typedef struct {
	uint32_t  class;
	uint16_t size;
	uint16_t data[];
} JVM_Array_Char;


typedef struct {
	uint32_t  class;
	uint16_t size;
	int16_t data[];
} JVM_Array_Short;

typedef struct {
	uint32_t  class;
	uint16_t size;
	int32_t data[];
} JVM_Array_Int;



#endif /* JVM_OPCODEARRAY_H_ */

uint16_t JVM_cmd_iaload();
uint16_t JVM_cmd_laload();
uint16_t JVM_cmd_faload();
uint16_t JVM_cmd_daload();
uint16_t JVM_cmd_aaload();
uint16_t JVM_cmd_baload();
uint16_t JVM_cmd_caload();
uint16_t JVM_cmd_saload();


uint16_t JVM_cmd_iastore();
uint16_t JVM_cmd_lastore();
uint16_t JVM_cmd_fastore();
uint16_t JVM_cmd_dastore();
uint16_t JVM_cmd_aastore();
uint16_t JVM_cmd_bastore();
uint16_t JVM_cmd_castore();
uint16_t JVM_cmd_sastore();

uint16_t JVM_cmd_newarray();
uint16_t JVM_cmd_anewarray();
uint16_t JVM_cmd_multianewarray();
uint16_t JVM_cmd_arraylength();

JVM_HandleNumber_t makeReferenceArray(uint16_t count,JVM_Class_t *myClass);
JVM_HandleNumber_t makePrimitiveArray(uint16_t count,JVM_Class_t *myClass,uint8_t primitiveType);
JVM_HandleNumber_t makeMultidimensionalArray(uint16_t * dimensionTable,JVM_Class_t *myClass,uint8_t primitiveType);
